All higher organisms face the problem of defending themselves from attack by microbes. The primary means by which pathogenic microbes succeed is through their ability to introduce variability into their molecular machinery to deceive, overwhelm, or avoid detection by the host. The inherent importance of genetic variation in the host to counteract this ongoing assault poses a challenge to the maintenance and control of innate immune pathways. This project aims to quantify attributes of the gene regulatory network underlying variation in innate immunity in Drosophila melanogaster. Gene expression will be measured across signal transduction pathways in 288 naturally variant Drosophila genotypes following infection with several different pathogens. Immune competence of the flies and molecular sequence polymorphism in relevant genes and will also be scored. A compartment model for the gene regulatory network will be fitted by Bayesian methods to identify associations among SNPs, expression level, and immune competence. The second aim is to quantify the degree of population substructure in innate immunity genes to test the hypothesis that polymorphism in these genes is maintained by strong, regional bouts of natural selection driven by local pathogen infections. 480 SNPs will be scored across 50 genes in innate immunity and 20 non-immunity genes in a set of 20 lines from each of 19 geographically diverse populations and quantify population substructure. In addition to the SNP assays, functional heterogeneity across these populations will be assessed by measuring immune competence against a set of bacterial and fungal pathogens. A third aim will quantify the costs of innate immunity and test whether variability in immune competence is balanced by tradeoffs against other fitness components. The final aim is to do a molecular evolutionary analysis of the complete network of genes involved in innate immunity across 12 sequenced Drosophila genomes to determine which genes have faced the greatest pressures for adaptive evolution and provide insight on how pathogens have driven changes in innate immunity. Through our modeling efforts, data from all four aims will provide an integrated, quantitative picture of variation in Drosophila innate immune function and its control by its underlying gene regulatory network.